package com.ubireality.factories;

import java.util.Set;

import javax.enterprise.inject.Any;
import javax.enterprise.inject.Default;
import javax.enterprise.inject.Produces;
import javax.enterprise.inject.spi.InjectionPoint;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;

import org.apache.log4j.Logger;

import com.google.common.collect.ImmutableSet;
import com.google.common.util.concurrent.Service;
import com.ubireality.repository.UserRepository;

public class ResourcesFactory {
	@Produces
	Logger getLogger(InjectionPoint ip) {
		String category = ip.getMember().getDeclaringClass().getName();
		return Logger.getLogger(category);
	}

	/*
	 * @Produces org.jboss.resteasy.logging.Logger getWSLogger(InjectionPoint
	 * ip) { Class<?> category = ip.getMember().getDeclaringClass(); return
	 * org.jboss.resteasy.logging.Logger.getLogger(category); }
	 */

	@Produces
	@PersistenceContext(unitName = "Patronus")
	EntityManager entityManager;

	/*
	 * @Produces Set<Service> guavaCdiClashWorkaround() { return
	 * ImmutableSet.of(); }
	 */
	// this is one of the solution for guava14 bug

}
